Skip to content

fix(reader): columnStats reports decimal min/max; decimals compare by value (#583) - #695

Merged
dfa1 merged 1 commit into
mainfrom
fix/583-decimal-zone-bounds
Nov 8, 2026
Merged

dfa1 merged 1 commit into
mainfrom
fix/583-decimal-zone-bounds

Conversation

@dfa1

@dfa1 dfa1 commented Nov 7, 2026

Copy link
Copy Markdown
Owner

Part of #583 (does not close it).

  • The zone-table decode did not box decimals, so a decimal column had no min/max in columnStats() and its filters never pruned. It does now.
  • Compare took a BigDecimal as a Number and compared the truncated long. Decimal and unresolved-column compares go by value; primitive columns keep their order (unsigned, floating) whatever the operand; NaN/Inf/text/null operands throw VortexException.
  • Tests: per-zone decimal bounds and nine filtered scans (writer), column stats and Java filtered reads of a vortex-jni file and a Java one (integration), a parameterized CompareTest.

Not in this PR: a Calcite decimal MIN/MAX push-down test; Rust-written decimal flat-node stats (ArrayStats.decodeScalar reads them as text, predates this).

🤖 Generated with Claude Code

https://claude.ai/code/session_011fRbYsrGtpKHp9APhU8qDV

… compare by value (#583)

The zone-table decode boxed primitives, bools and strings but not decimals, so a decimal
column (Java- or Rust-written) had no min/max in VortexReader.columnStats(), and zone-map
pruning of decimal filters never fired. Compare also treated a BigDecimal as a Number and
fell to the long compare, so 1.5 and 1.2 were equal. Decimal and unresolved-column compares
now go by value, against another decimal or a long, big integer or finite float operand
(anything else throws VortexException); primitive columns keep their own order, so an
unsigned or floating column is unchanged whatever the operand.

ZoneMapPruningTest checks each zone's decoded decimal bounds and the rows of nine filtered
scans; DecimalBytePartsInteropIntegrationTest checks column stats on a vortex-jni file and
on Java's own, and Java's filtered read of both.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011fRbYsrGtpKHp9APhU8qDV
@dfa1
dfa1 force-pushed the fix/583-decimal-zone-bounds branch from 667103b to 5e07ffd Compare November 8, 2026 07:45
@dfa1
dfa1 merged commit 243c378 into main Nov 8, 2026
6 checks passed
@dfa1
dfa1 deleted the fix/583-decimal-zone-bounds branch November 8, 2026 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant